<include file="Public:header" />
<script type="text/javascript" src="__PUBLIC__/js/kindeditor-all-min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/zh_CN.js"></script>
<link rel="stylesheet" href="__PUBLIC__/css/kindeditor.css" type="text/css" />
<script type="text/javascript">
	<if condition="C('ismobile') neq 1">
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				uploadJson:'__APP__/index.php/File/editor/',
				allowFileManager : true,
				loadStyleMode : false,
				fileManagerJson: "__APP__/index.php/File/manager/"
			});
		});
	</if>
</script>
<div class="container">
	<!-- Docs nav ================================================== -->
	<div class="page-header">
		<h4>编辑 用户</h4>
	</div>
	<div class="row">
		<div class="span12">
			<include file="Public:alert" />
			<form action="__APP__/index.php/Users/edit/" method="post" enctype="multipart/form-data">
			   <input type="hidden" name="id" id="id" value="{$vo.id}" />
				<input  type="hidden" name="role_id" value="{$Think.session.role_id}"/>
				<table class="table" border="0" cellspacing="1" cellpadding="0">
					<thead>
						<tr>
							<td colspan="2"><input name="submit" class="btn btn-primary" type="submit" value="保存"/>&nbsp; <input class="btn btn-primary" name="submit" type="submit" value="保存 & 新增"/> &nbsp;<input class="btn" type="button" onclick="javascript:history.go(-1)" value="返回"/></td>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="2"><input class="btn btn-primary"  name="submit" type="submit" value="保存"/> &nbsp;<input class="btn btn-primary" type="submit" value="保存 & 新增"/>&nbsp; <input class="btn" type="button" onclick="javascript:history.go(-1)" value="返回"/></td>
						</tr>
					</tfoot>
					<tbody>
						
						<tr>
							<td class="tdleft">姓名</td>
							<td><input class="span3" type="text" name="name" id="name" size="80" placeholder="姓名" value="{$vo.name}"></td>
						</tr>
						<tr>
							<td class="tdleft">性别</td>
							<td>
								<input type="radio" name="sex" value="男" <if condition="$vo.sex eq '男'">checked</if>>  男
								<input type="radio" name="sex" value="女" <if condition="$vo.sex eq '女'">checked</if>>  女
							</td>
						</tr>
						<tr>
						<td class="tdleft">最高学历</td>
							<td>
								<select name="xueli">
									<option value="初中及以下" <if condition="$vo.zdxl eq '初中及以下' ">selected</if> >初中及以下</option>
									<option value="高中/中技/中专" <if condition="$vo.zdxl eq '高中/中技/中专' ">selected</if> >高中/中技/中专</option>
									<option value="大专" <if condition="$vo.xueli eq '大专' ">selected</if> >大专</option>
									<option value="本科" <if condition="$vo.xueli eq '本科' ">selected</if> >本科</option>
									<option value="硕士" <if condition="$vo.xueli eq '硕士' ">selected</if> >硕士</option>
									<option value="博士" <if condition="$vo.xueli eq '博士' ">selected</if> >博士</option>
								</select>
							</td>
						</tr>
						<tr>
							<td class="tdleft">联系电话</td>
							<td>
								<input class="span3" type="text" name="mobile" id="mobile" size="80" placeholder="联系电话" value="{$vo.mobile}">
							</td>
						</tr>
						<tr>
							<td class="tdleft">用户权限组</td>
							<td>
								<select name="groups">
									<option value="1"<?php if($vo['groups']==1)echo " selected";?>>普通用户</option>
									<option value="2"<?php if($vo['groups']==2)echo " selected";?>>VIP用户</option>
									<option value="3"<?php if($vo['groups']==3)echo " selected";?>>核心用户</option>
									<option value="4"<?php if($vo['groups']==4)echo " selected";?>>内部员工</option>
								</select>
							</td>
						</tr>
					</tbody>
				</table>
			</form>

		</div>
	</div>
</div>
<script type="text/javascript">
	<if condition="C('ismobile') eq 1">
		width=$('.container').width() * 0.9;
		$("#content").css({
			width : width
		});
	</if>
	$("input[name='submit']").click(function(){			
		if($("#name").val() == null || $("#name").val() == ""){
			alert('名称不能为空');
			return false;
		}
	})

	$(".fa-desktop").parent().parent().addClass("active");
	$(".fa-align-right").parent().parent().addClass("active");

</script>
<include file="Public:footer" />